// Script assets have changed for v2.3.0 see
// https://help.yoyogames.com/hc/en-us/articles/360005277377 for more information
function scrLoad(){
 if (file_exists("Save_Game.save"))
    {
		global.enemyCount = 0;
        room_restart();
		with o_Creature instance_destroy();
        var _buffer = buffer_load("Save_Game.save");
        var _string = buffer_read(_buffer, buffer_string);
        buffer_delete(_buffer);
        var _loadData = json_parse(_string);
        for (var i = 0; i < array_length(_loadData); ++i) 
        {

            if _loadData[i].obj == "Main"
            {
                with (instance_create_layer(0, 0, "Instances", asset_get_index(_loadData[i].obj)))
                {
                    x = _loadData[i].x;
                    y = _loadData[i].y;
					hp =  _loadData[i].hp;
					fw_level = _loadData[i].fw_level;
					sw_level = _loadData[i].sw_level;
					tw_level = _loadData[i].tw_level;
					fw_spec = _loadData[i].fw_spec;
					sw_spec = _loadData[i].sw_spec;
					tw_spec = _loadData[i].tw_spec;
					weapon_type1 = _loadData[i].weapon_type1;
					weapon_type2 = _loadData[i].weapon_type2;
					weapon_type3 = _loadData[i].weapon_type3;
                }                   
            }
        }
    }
}